#include "Process.h"

typedef void (*Create_t)(double,double);

void DownLoad(Create_t ct)
{
	double total = 1024.0;
	double download = 0.0;

	double speed = 2.0;

	while(download <= total)
	{
		ct(total,download);
		download += speed;
		usleep(100);
	}
	printf("\ndownload %.2lf MB\n",total);
}

void UpLoad(Create_t ct)
{
	double total = 1024.0;
	double download = 0.0;

	double speed = 2.0;

	while(download <= total)
	{
		ct(total,download);
		download += speed;
		usleep(100);
	}
	printf("\nupload %.2lf MB\n",total);
}

int main()
{
	DownLoad(process);
	DownLoad(process);
	DownLoad(process);
	DownLoad(process);
	

	UpLoad(process);
	UpLoad(process);
	UpLoad(process);

	return 0;



}
